package com.shejimoshi.Abstract_Color_Shape;

import com.shejimoshi.AbstaractFactoy.AbstractFactory;
import com.shejimoshi.Color_Demo.Color;
import com.shejimoshi.Color_Demo.impl.Blue;
import com.shejimoshi.Color_Demo.impl.Green;
import com.shejimoshi.Color_Demo.impl.Red;
import com.shejimoshi.Shape_Demo.Shape;

public class ColorFactory extends AbstractFactory {
    @Override
    public Shape getShape(String shape) {
        return null;
    }

    @Override
    public Color getColor(String color) {
        if(color == null || color =="")return null;

        if(color.equalsIgnoreCase("red")){
            return new Red();
        }else if(color.equalsIgnoreCase("green")){
            return new Green();
        }else if(color.equalsIgnoreCase("blue")){
            return new Blue();
        }


        return null;

    }
}
